<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">


<!-- remove old header -->


<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>cogen API Reference Documentation
        - Class: WSGIServer</title><meta name="MSSmartTagsPreventParsing" content="true" /><meta http-equiv="imagetoolbar" content="no" /><link href="css/default.css" rel="stylesheet" type="text/css" /><link href="css/pygments.css" rel="stylesheet" type="text/css" />
    <!-- <link rel="shortcut icon" href="/images/favicon.ico" type="image/vnd.microsoft.icon"/> -->
    <link rel="stylesheet" href="css/apydia.css" type="text/css" />
    <script src="js/jquery-1.2.1.pack.js" type="text/javascript"></script>
    <script src="js/apydia.js" type="text/javascript"></script>
	<link rel="icon" href="images/favicon.ico" type="image/x-icon" />
</head>
<body>
    <div id="page">
        <div id="browser">
            <div class="browser-section">
                <h2>Module Index</h2>
                <ul>
                    <li>
                        <a href="cogen.html">cogen</a>
                    </li><li>
                        <a href="cogen.common.html">cogen.common</a>
                    </li><li>
                        <a href="cogen.core.html">cogen.core</a>
                    </li><li>
                        <a href="cogen.core.coroutines.html">cogen.core.coroutines</a>
                    </li><li>
                        <a href="cogen.core.events.html">cogen.core.events</a>
                    </li><li>
                        <a href="cogen.core.pubsub.html">cogen.core.pubsub</a>
                    </li><li>
                        <a href="cogen.core.queue.html">cogen.core.queue</a>
                    </li><li>
                        <a href="cogen.core.reactors.html">cogen.core.reactors</a>
                    </li><li>
                        <a href="cogen.core.reactors.base.html">cogen.core.reactors.base</a>
                    </li><li>
                        <a href="cogen.core.reactors.iocp_proactor.html">cogen.core.reactors.iocp_proactor</a>
                    </li><li>
                        <a href="cogen.core.reactors.poll_reactor.html">cogen.core.reactors.poll_reactor</a>
                    </li><li>
                        <a href="cogen.core.reactors.qt_reactor.html">cogen.core.reactors.qt_reactor</a>
                    </li><li>
                        <a href="cogen.core.reactors.select_reactor.html">cogen.core.reactors.select_reactor</a>
                    </li><li>
                        <a href="cogen.core.schedulers.html">cogen.core.schedulers</a>
                    </li><li>
                        <a href="cogen.core.sockets.html">cogen.core.sockets</a>
                    </li><li>
                        <a href="cogen.core.util.html">cogen.core.util</a>
                    </li><li>
                        <a href="cogen.web.html">cogen.web</a>
                    </li><li>
                        <a href="cogen.web.async.html">cogen.web.async</a>
                    </li><li class="active">
                        <a href="cogen.web.wsgi.html">cogen.web.wsgi</a>
                    </li>
                </ul>
            </div>
            <div class="browser-section">
                <h2>cogen.web.wsgi</h2>
                <ul>
                    <li>
                        <a href="cogen.web.wsgi.WSGIServer.WSGIConnection.html">WSGIConnection</a>
                    </li><li>
                        <a href="cogen.web.wsgi.WSGIFileWrapper.html">WSGIFileWrapper</a>
                    </li><li class="active">
                        <a href="cogen.web.wsgi.WSGIServer.html">WSGIServer</a>
                    </li>
                </ul>
            </div>
            <div class="browser-section">
                <h2>Classes</h2>
                <ul>
                    <li>
                        <a href="cogen.web.wsgi.WSGIServer.WSGIConnection.html">WSGIConnection</a>
                    </li>
                </ul>
            </div>
            <div class="browser-section">
                <h2>Constructor</h2>
                <ul>
                    <li>
                        <a href="cogen.web.wsgi.WSGIServer.html#constructor">__init__</a>
                    </li>
                </ul>
            </div>
            <div class="browser-section">
                <h2>Methods</h2>
                <ul>
                    <li>
                        <a href="cogen.web.wsgi.WSGIServer.html#method-bind">bind</a>
                    </li><li>
                        <a href="cogen.web.wsgi.WSGIServer.html#method-serve">serve</a>
                    </li>
                </ul>
            </div>
            <div class="browser-section">
                <h2>Attributes</h2>
                <ul>
                    <li>
                        <a href="cogen.web.wsgi.WSGIServer.html#attribute-STATE_NEED_INIT">STATE_NEED_INIT</a>
                    </li><li>
                        <a href="cogen.web.wsgi.WSGIServer.html#attribute-bind_addr">bind_addr</a>
                    </li><li>
                        <a href="cogen.web.wsgi.WSGIServer.html#attribute-environ">environ</a>
                    </li><li>
                        <a href="cogen.web.wsgi.WSGIServer.html#attribute-protocol">protocol</a>
                    </li>
                </ul>
            </div>
        </div>
        <div id="content">
    <h1>Class: cogen.web.wsgi.WSGIServer</h1>
    <div class="docstring rst"><p>An HTTP server for WSGI.</p>
<table border="1" class="docutils">
<colgroup>
<col width="25%" />
<col width="75%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Option</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td>bind_addr</td>
<td><p class="first">The interface on which to listen for connections.
For TCP sockets, a (host, port) tuple. Host values may
be any IPv4 or IPv6 address, or any valid hostname.
The string 'localhost' is a synonym for '127.0.0.1' (or
'::1', if your hosts file prefers IPv6).
The string '0.0.0.0' is a special IPv4 entry meaning
"any active interface" (INADDR_ANY), and '::' is the
similar IN6ADDR_ANY for IPv6. The empty string or None
are not allowed.</p>
<p class="last">For UNIX sockets, supply the filename as a string.</p>
</td>
</tr>
<tr><td>wsgi_app</td>
<td>the WSGI 'application callable'; multiple WSGI
applications may be passed as (path_prefix, app) pairs.</td>
</tr>
<tr><td>server_name</td>
<td>the string to set for WSGI's SERVER_NAME environ entry.
Defaults to socket.gethostname().</td>
</tr>
<tr><td>request_queue_size</td>
<td>the 'backlog' argument to socket.listen();
specifies the maximum number of queued connections
(default 5).</td>
</tr>
<tr><td>protocol</td>
<td>the version string to write in the Status-Line of all
HTTP responses. For example, "HTTP/1.1" (the default).
This also limits the supported features used in the
response.</td>
</tr>
</tbody>
</table>
</div>
    <ul class="link-bar">
    <li class="link-to-sourcecode">
        <a href="http://code.google.com/p/cogen/source/browse/trunk/cogen/web/wsgi.py#563">View source</a>
    </li>
</ul>
    <div>
        <h2>Classes</h2>
            <h3>
                <a href="cogen.web.wsgi.WSGIServer.WSGIConnection.html">WSGIConnection</a>
            </h3>
            <div class="docstring rst"></div>
            <ul class="link-bar">
    <li>
        <a href="cogen.web.wsgi.WSGIServer.WSGIConnection.html">Details</a>
    </li>
    <li class="link-to-sourcecode">
        <a href="http://code.google.com/p/cogen/source/browse/trunk/cogen/web/wsgi.py#140">View source</a>
    </li>
</ul>
    </div>
    <div>
        <h2>Constructor</h2>
        <h3 id="constructor">
            __init__
            <span class="args">(self, bind_addr, wsgi_app, scheduler, server_name=None, request_queue_size=64, sockoper_run_first=True, sockoper_timeout=15, sendfile_timeout=-1, sockaccept_greedy=False)</span>
        </h3>
        <div class="docstring rst"></div>
        <ul class="link-bar">
    <li class="link-to-sourcecode">
        <a href="http://code.google.com/p/cogen/source/browse/trunk/cogen/web/wsgi.py#602">View source</a>
    </li>
</ul>
    </div>
    <div>
        <h2>Methods</h2>
            <h3 id="method-bind">
                bind
                <span class="args">(self, family, type, proto=0)</span>
            </h3>
            <div class="docstring rst"><p>Create (or recreate) the actual socket object.</p>
</div>
            <ul class="link-bar">
    <li class="link-to-sourcecode">
        <a href="http://code.google.com/p/cogen/source/browse/trunk/cogen/web/wsgi.py#749">View source</a>
    </li>
</ul>
            <h3 id="method-serve">
                serve
                <span class="args">(*args, **kws)</span>
            </h3>
            <div class="docstring rst"><p>Run the server forever.</p>
</div>
            <ul class="link-bar">
    <li class="link-to-sourcecode">
        <a href="http://code.google.com/p/cogen/source/browse/trunk/cogen/core/coroutines.py#25">View source</a>
    </li>
</ul>
    </div>
    <div>
        <h2>Attributes</h2>
            <h3 id="attribute-STATE_NEED_INIT">STATE_NEED_INIT</h3>
            <div class="docstring rst"></div>
            <h4>Value of STATE_NEED_INIT</h4>
            <pre class="code"><code>0</code></pre>
            <ul class="link-bar">
    <li class="link-to-sourcecode">
        <a href="http://code.google.com/p/cogen/source/browse/trunk#0">View source</a>
    </li>
</ul>
            <h3 id="attribute-bind_addr">bind_addr</h3>
            <div class="docstring rst"></div>
            <h4>Value of bind_addr</h4>
            <pre class="code"><code>&lt;property object at 0x00DC5C60&gt;</code></pre>
            <ul class="link-bar">
    <li class="link-to-sourcecode">
        <a href="http://code.google.com/p/cogen/source/browse/trunk#0">View source</a>
    </li>
</ul>
            <h3 id="attribute-environ">environ</h3>
            <div class="docstring rst"></div>
            <h4>Value of environ</h4>
            <pre class="code"><code>{}</code></pre>
            <ul class="link-bar">
    <li class="link-to-sourcecode">
        <a href="http://code.google.com/p/cogen/source/browse/trunk#0">View source</a>
    </li>
</ul>
            <h3 id="attribute-protocol">protocol</h3>
            <div class="docstring rst"></div>
            <h4>Value of protocol</h4>
            <pre class="code"><code>'HTTP/1.1'</code></pre>
            <ul class="link-bar">
    <li class="link-to-sourcecode">
        <a href="http://code.google.com/p/cogen/source/browse/trunk#0">View source</a>
    </li>
</ul>
    </div>
        </div>
        <div id="footer">
            Generated with <a href="http://apydia.ematia.de/" class="extern">
            Apydia 0.0.3</a>
        </div>
    </div>
</body>
</html>